<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<base href="<%=basePath%>" />
		<title>用户权限管理</title>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<link rel="stylesheet" href="css/style.css" type="text/css"></link>


		<script type="text/javascript" src="js/jquery-1.6.js">
</script>

	<script type="text/javascript" src="js/pos_depart.js"></script></head>
	<body onload="changeDaperment()">
						<div class="top">
							&nbsp;<img src="images/index_32.gif"></img>&nbsp;<font style="font-size: 13px" color="#FFFFFF">用户权限管理</font>
						</div><br/>
		<center>
			<form name="form1" method="post" action="findByPage">
				<table width="95%" border="0" align="center" cellpadding="0"
					cellspacing="0" class="table01">
					<tr>
						<td class="td_02">
							部&nbsp;&nbsp;&nbsp;门：
						</td>
						<td class="td_02" style="text-align: left">
							&nbsp;&nbsp;<select style="width: 30%;" id="department"
								onchange="changeDaperment()" name="employee.position.department.departmentId">
								<option value="0">
									请选择
								</option>
								<s:iterator value="departments">
									<option value="${departmentId}">
										<s:property value="departmentName" />
									</option>
								</s:iterator>
							</select>
						</td>
						<td width="10%" class="td_02">
							职&nbsp;&nbsp;&nbsp;务：
						</td>
						<td class="td_02" style="text-align: left">
							<div id="position"></div>
						</td>
					</tr>
					<tr>
						<td width="10%" class="td_02">
							员工姓名：
						</td>
						<td width="40%" class="td_02" style="text-align: left">&nbsp;
							<input name="employee.userName" type="text" class="input" style="width: 55%" />
						</td>
						<td width="10%" class="td_02">
							&nbsp;
						</td>
						<td class="td_02">
							&nbsp;
						</td>
					</tr>
					<tr>
						<td width="10%" class="td_02">
							&nbsp;
						</td>
						<td class="td_02">
							&nbsp;
						</td>
						<td class="td_02">
							&nbsp;
						</td>
						<td class="td_02">
							<input type="submit" " class="buttonface02" value=" 查询 " />
						</td>
					</tr>
				</table>
			</form>
			<br />
			<table width="95%" border="0" cellpadding="0" cellspacing="0"
				class="table02" align="center">
				<tr>
					<td height="30" align="right">
						<div align="left"></div>
						<img src="images/1.gif" width="4" height="5" />
						<a href="findByPage?pageBean.currentPage=1">首页</a>
						<img src="images/2.gif" width="3" height="5" />
						<c:if test="${pageBean.prew==false}">上一页</c:if>
						<c:if test="${pageBean.prew}">
							<a href="findByPage?pageBean.currentPage=${pageBean.currentPage-1}">上一页</a>
						</c:if>
						<img src="images/2-2.gif" width="3" height="5" />
						<c:if test="${pageBean.next==false}">
            			下一页
           				 </c:if>
						<c:if test="${pageBean.next}">
							<a
								href="findByPage?pageBean.currentPage=${pageBean.currentPage+1}">下一页</a>
						</c:if>
						<img src="images/3.gif" width="4" height="5" />
						<a href="findByPage?pageBean.currentPage=${pageBean.last}">末页</a>
					</td>
				</tr>
			</table>
			<table width="95%" border="0" align="center" cellpadding="2"
				cellspacing="0" class="table01">
				<tr >
					<td width="10%" class="td_top">
						用户姓名
					</td>
					<td width="11%" class="td_top">
						所属部门
					</td>
					<td width="13%" class="td_top">
						职 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;务
					</td>
					<td width="21%" class="td_top">
						移动电话
					</td>
					<td width="13%" class="td_top">
						分配角色
					</td>
				</tr>
				<c:if test="${list==null}">
					<tr>
						<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td colspan="3" class="td_top">
						查无结果,请重新输入条件
						</td>
						<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
					</tr>
				</c:if>
				<c:if test="${list!=null}">
				<s:iterator value="list">
					<tr>
						<td class="td_02">
							<font color="#000000"><s:property value="userName" /> </font>
							<input type="hidden" value="<s:property value='userId'/>" />
						</td>
						<td class="td_02">
							<s:property value="position.department.departmentName" />
						</td>
						<td class="td_02">
							<s:property value="position.positionName" />
						</td>
						<td class="td_02">
							<s:property value="userPhone" />
						</td>
						<td class="td_02">
							<a
								href="payRoles?key= <s:property value='userId'/>">分配角色
							</a>
						</td>
					</tr>
				</s:iterator>
				</c:if>
			</table>
			<p>
				&nbsp;
			</p>
		</center>
	</body>
</html>
